package com.itheima.mapper;

import com.itheima.pojo.Brand;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface BrandMapper {
    /**
     * 查询所有
     * @return
     */
    @Select("select * from tb_brand")
    @ResultMap("brandResultMap")
    List<Brand> selectAll();

    /**
     * 新增
     * @param brand
     * @return
     */
    @Insert("insert into tb_brand(id,brand_name,company_name,ordered,description,status) values(null,#{brandName},#{companyName},#{ordered},#{description},#{status})")
    int add(Brand brand);



}
